@import '~@/assets/less/variable';

html,
body,
#root {
  height: 100%;
}

html {
  overflow: hidden;
}

.colorWeak {
  filter: invert(80%);
}

.ant-layout {
  // min-height: 100vh;
  height: 100vh;
  overflow: auto;
}

.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
  left: unset;
}

canvas {
  display: block;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ul,
ol {
  list-style: none;
}

@media (max-width: @screen-xs) {
  .ant-table {
    width: 100%;
    overflow-x: auto;

    &-thead > tr,
    &-tbody > tr {
      > th,
      > td {
        white-space: pre;

        > span {
          display: block;
        }
      }
    }
  }
}

// 兼容IE11
@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) {
  body .ant-design-pro > .ant-layout {
    min-height: 100vh;
  }
}

.initialLoading {
  .ant-spin-spinning {
    max-height: none !important;
  }

  .loadingPlaceholder {
    height: 100vh;
  }
}

.ant-pro-page-container-children-content {
  margin: 0 @gap-base 0 !important;

  .sula-template-query-table {
    margin-top: @gap-base;

    .ant-table-container {
      padding: 10px 24px;
    }
  }

  .ant-card-body {
    padding: 1px 0 0;
    background-color: @body-bg;

    .sula-template-query-table-fields-wrapper {
      border-top-left-radius: 0;
      border-top-right-radius: 0;
    }

    .ant-table-container {
      padding: 20px @gap-base;
    }
  }
}

.sula-template-query-table-fields-wrapper {
  padding: 24px 24px 12px 24px;
  border-bottom: none;
  border-radius: @border-radius-base;

  .ant-form-item {
    margin-bottom: @gap-base;

    .ant-form-item-label {
      overflow: visible;
      font-weight: normal;
    }
  }
}

.ant-form-item-label {
  font-weight: 500;
}

.ant-page-header {
  background-color: transparent;

  &.has-breadcrumb {
    padding: 12px;
  }
}

.ant-pro-page-container-warp {
  background-color: transparent;
}

.ant-table-thead > tr > th {
  padding-top: 11px !important;
  padding-bottom: 11px !important;
  font-size: @font-size-md !important;
}

// .ant-input,
// .ant-input-affix-wrapper,
// .ant-select-selector {
//   border-radius: @border-radius-lg  !important;
// }

.ant-input-affix-wrapper {
  & > input {
    border-radius: 0 !important;
  }
}

.ant-spin-spinning {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.ant-menu-submenu-title {
  .anticon {
    color: #000;
  }

  .ant-pro-menu-item-title {
    color: #000;
    font-weight: 700;
  }
}

// .ant-form-horizontal {
//   .ant-form-item-label {
//     & > label {
//       justify-content: flex-end !important;
//       width: 100% !important;
//     }
//   }
// }

.ant-col-48 {
  display: block;
  flex: 0 0 20%;
  max-width: 20%;
}

.ant-drawer-body {
  .ant-form-item-label {
    font-size: @font-size-md;
  }
}

.ant-descriptions-item-label {
  white-space: nowrap;
}

.noMedia {
  color: #a2a2a2;
}

.disabledMedia {
  color: #843900;
}

.losslessMedia {
  color: #67c23a;
}

.primaryWord {
  color: @primary-color;
}

.successWord {
  color: #67c23a;
}

.dangerWord {
  color: #e23c39;
}

.sula-template-query-table {
  .ant-table-tbody > tr > td {
    &:first-child {
      padding-left: @gap-base !important;
    }

    &:last-child {
      padding-right: @gap-base !important;
    }
  }

  .ant-table-thead > tr > th:first-child {
    &:first-child {
      padding-left: @gap-base !important;
    }

    &:last-child {
      padding-right: @gap-base !important;
    }
  }
}

.ant-card-head {
  min-height: 0 !important;

  .ant-tabs-large > .ant-tabs-nav .ant-tabs-tab {
    padding: 10px 0 !important;
  }
}

.ant-card-head-title {
  padding: 12px 0 !important;
}

.linkBtn {
  padding: 0 !important;
}

.formItemLabel {
  color: @heading-color;
  font-weight: 500;
  font-size: @font-size-md;
}

.ant-tag {
  .importantWord {
    color: #f26522;
  }
}

.ant-tag-checkable-checked {
  .importantWord {
    color: #fff;
  }
}

// .ant-table.ant-table-small .ant-table-title,
.ant-table.ant-table-small .ant-table-footer,
.ant-table.ant-table-small .ant-table-thead tr th,
.ant-table.ant-table-small .ant-table-tbody tr td,
.ant-table.ant-table-small tfoot tr th,
.ant-table.ant-table-small tfoot tr td {
  // padding: 2px 2px;
  padding-top: 2px;
  padding-bottom: 2px;
}

.ant-spin-container .ant-form-item-label label {
  height: 15px;
}

.ant-card-body .ant-form-item {
  margin-bottom: 8px;
}

.ant-drawer-body .ant-form-item {
  margin-bottom: 8px;
}

.ant-form-vertical .ant-form-item-label,
.ant-col-24.ant-form-item-label,
.ant-col-xl-24.ant-form-item-label {
  padding: 0;
}

.ant-table-small .sula-table-action-wrapper {
  margin-right: 0;
  margin-left: 0;
}

.ant-input[disabled],
.ant-select-selector,
.ant-radio-button-wrapper-disabled.ant-radio-button-wrapper-checked {
  color: #000 !important;
}

.ant-table-cell{
  font-size: 16px;
  font-weight: 600;
}

.ant-card-body{
  font-size: 16px;
}